{include file="notice.tpl"} 
<center><h2><span class="link" onclick="loadFileList()" title="{$lang.reload}">{$projectname}</span></h2>
{if $projectmessage neq ''} <span style="font-style: oblique">{$projectmessage}</span> {/if}
</center>
<br>
<center>

<form method="post" id="reload" name="reload">
	<input type="hidden" name="flowid" id="flowid" value="{$flowid}">
	<input type="hidden" name="teamid" id="teamid" value="{$teamid}">
	<input type="hidden" name="action" id="action" value="list">
	<input type="hidden" name="forder" id="forder" value="{$order}">
	<input type="hidden" name="currentpage" id="currentpage" value="{$currentpage}">
	<input type="hidden" name="fmyfiles" id="fmyfiles" value="{$myfiles}">
	<input type="hidden" name="ffilestate" id="ffilestate" value="{$filestate}">
	<input type="hidden" name="op" id="op" value="">
{*
	<input type="hidden" name="fstatusid" id="fstatusid" value="{$statusid}">
	<input type="hidden" name="fpath" id="fpath" value="{$path.id}">	
	<input type="hidden" name="fuserid" id="fuserid" value="{$userid}">
	<input type="hidden" name="recperpage" id="recperpage" value="{$recperpage}">
*}
<table class="filterbox">
<tr>
	<td colspan="8" style="text-align: left">
	<b>{$lang.filterby}</b>
	</td>
<tr>
<tr>
	<td style="text-align: right">
	{$lang.status}
	</td>
	<td style="text-align: left">
	<select id="fstatusid" name="fstatusid" class="txt" onchange="addfilter('fstatusid',this)">
		<option value="">{$lang.all}</option>
		{foreach from=$statuslist item=strow}
		{eval var=$strow assign="stid"}
		<option value="{$stid}" {if $stid eq $statusid} selected {/if}>{$lang.$stid}</option>
		{/foreach}
	</select>
	</td>
<td style="text-align: right">
{$lang.filepath}
</td>
	<td  style="text-align: left">
	<select id="fpath" name="fpath" class="txt" onchange="addfilter('fpath',this)">
		<option value="">{$lang.all}</option>
		{foreach from=$pathlist item=ptrow}
		<option value="{$ptrow->id}" {if $ptrow->id eq $path.id} selected {/if}>{$ptrow->name}</option>
		{/foreach}
	</select>
	</td>
<td style="text-align: right">
{$lang.userid}
</td>
	<td  style="text-align: left">
	<select id="fuserid" name="fuserid" class="txt" onchange="addfilter('fuserid',this)">
		<option value="">{$lang.all}</option>
		{foreach from=$userlist item=urow}
		<option value="{$urow}" {if $urow eq $userid} selected {/if}>{$urow}</option>
		{/foreach}
	</select>
	</td>
<td style="text-align: right">
{$lang.recordperpage}
</td>
	<td  style="text-align: left">
	<select id="recperpage" name="recperpage" class="txt" onchange="addfilter('recperpage',this)">
		{foreach from=$recordsperpage item=rp}
		<option value="{$rp}" {if $rp eq $recperpage} selected {/if}>{$rp}</option>
		{/foreach}
	</select>
	</td>	
</tr>
</table>

<table class="filterbox">
<tr>
	<td style="text-align: left">
	<b>{$lang.showonly}</b>
	</td>
	<td style="text-align: left" class="label_field_pair">
	<input class="txt" type="checkbox" id="myfiles" value="true" {if $myfiles eq 'true'} selected {/if} onchange="addfilter('fmyfiles',this)">
	<label for="myfiles">{$lang.myfiles}</label>
	</td>
	<td style="text-align: left" class="label_field_pair">
	<input class="txt" type="radio" name="filestate" value="1" {if $filestate eq '1'} checked {/if} onclick="addfilter('ffilestate',this)"><img src="images/green.gif" alt="ok" width="8" height="8">
	</td>
	<td style="text-align: left;" class="label_field_pair">
	<input class="txt" type="radio" name="filestate" value="2" {if $filestate eq '2'} checked {/if} onclick="addfilter('ffilestate',this)"><img src="images/yellow_static.gif" alt="fuzzy" width="8" height="8">
	</td>
	<td style="text-align: left" class="label_field_pair">
	<input class="txt" type="radio" name="filestate" value="3" {if $filestate eq '3'} checked {/if} onclick="addfilter('ffilestate',this)"><span style="valign: top"><img src="images/red_static.gif" alt="unstranslated" width="8" height="8"></span>
	</td>
	<td style="text-align: left" class="label_field_pair">
	<input class="txt" type="radio" name="filestate" value="" {if $filestate eq ''} checked {/if} onclick="addfilter('ffilestate',this)"><span style="valign: top">{$lang.all}</span>
	</td>
</tr>
</table>
</center>
</form>

<center>
{if $CURRENT_USER->groupid eq 'ADMIN'}
	<form method="post" id="add_file_form">
		<input type="hidden" name="add_file_prj" id="add_file_prj" value="{$projectid}">
		<input type="hidden" name="add_file_teamid" id="add_file_teamid" value="{$teamid}">
		Add File: <input type="text" name="add_file_name" id="add_file_name" class="txt">
		<select class="txt" id="add_file_subprj" name="add_file_subprj">
			{foreach from=$pathlist item=ptrow}
			<option value="{$ptrow->id}">{$ptrow->name}</option>
			{/foreach}
		</select>
		{include file="button.tpl" name=$lang.add action="addFile()"}
	</form>
{/if}

{include file="filelist.tpl"} 
</center>
